package com.edu.bhu.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.edu.bhu.admin.mapper.BikRecordMapper;
import com.edu.bhu.admin.domain.BikRecord;
import com.edu.bhu.admin.service.IBikRecordService;
import com.edu.bhu.common.core.text.Convert;

/**
 * 租车记录Service业务层处理
 * 
 * @author heyinan
 * @date 2022-03-14
 */
@Service
public class BikRecordServiceImpl implements IBikRecordService 
{
    @Autowired
    private BikRecordMapper bikRecordMapper;

    /**
     * 查询租车记录
     * 
     * @param recordId 租车记录主键
     * @return 租车记录
     */
    @Override
    public BikRecord selectBikRecordByRecordId(Long recordId)
    {
        return bikRecordMapper.selectBikRecordByRecordId(recordId);
    }

    /**
     * 查询租车记录列表
     * 
     * @param bikRecord 租车记录
     * @return 租车记录
     */
    @Override
    public List<BikRecord> selectBikRecordList(BikRecord bikRecord)
    {
        return bikRecordMapper.selectBikRecordList(bikRecord);
    }

    /**
     * 新增租车记录
     * 
     * @param bikRecord 租车记录
     * @return 结果
     */
    @Override
    public int insertBikRecord(BikRecord bikRecord)
    {
        return bikRecordMapper.insertBikRecord(bikRecord);
    }

    /**
     * 修改租车记录
     * 
     * @param bikRecord 租车记录
     * @return 结果
     */
    @Override
    public int updateBikRecord(BikRecord bikRecord)
    {
        return bikRecordMapper.updateBikRecord(bikRecord);
    }

    /**
     * 批量删除租车记录
     * 
     * @param recordIds 需要删除的租车记录主键
     * @return 结果
     */
    @Override
    public int deleteBikRecordByRecordIds(String recordIds)
    {
        return bikRecordMapper.deleteBikRecordByRecordIds(Convert.toStrArray(recordIds));
    }

    /**
     * 删除租车记录信息
     * 
     * @param recordId 租车记录主键
     * @return 结果
     */
    @Override
    public int deleteBikRecordByRecordId(Long recordId)
    {
        return bikRecordMapper.deleteBikRecordByRecordId(recordId);
    }
}
